#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 crane <crane@his-pc>
#
# Distributed under terms of the MIT license.

"""

"""


class Solution:
    def climbStairs(self, n):
        if 0 <= n <= 2:
            return n

        first, second = 1, 2

        for s in range(3, n+1):
            # second = first + second
            # first = second - first
            first, second = second, first + second

        return second


def main():
    print("start main")
    s = Solution()
    ret = s.climbStairs(5)
    print(ret)

if __name__ == "__main__":
    main()
